package api

import (
	"gitee.com/liuxiaowei123/vblog-3/app/blog"
	"gitee.com/liuxiaowei123/vblog-3/ioc"
)

// 此文件用来实现把BlogApiHandler对象托管到ioc中

const Appname = "apiblog"

func init() {
	ioc.Apihandler().Registry(&BlogApiHandler{})
}

func (b *BlogApiHandler) Init() {
	b.blogsvc = ioc.Controller().Get(blog.Appname).(blog.BlogService)
}

func (b *BlogApiHandler) Name() string {
	return Appname
}
